﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Data;
using System.Windows.Media.Imaging;
using Dominion.WPF.Properties;
using System.Windows;
using System.IO;
using System.Drawing.Imaging;
using System.Drawing;
using System.Resources;
using System.Reflection;

namespace Dominion.WPF.Converters
{
    public class CardNameToImageConverter : IValueConverter
    {

        #region IValueConverter Members

        public object Convert(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            string nomCarte =  value.ToString();
            if (nomCarte == null)
                throw new NotImplementedException("CarteNameToImageConverter can only convert from string");

            return ConvertersHelper.ImageFromName(nomCarte);
           
        }

        public object ConvertBack(object value, Type targetType, object parameter, System.Globalization.CultureInfo culture)
        {
            throw new NotSupportedException();
        }

        #endregion
    }
}
